Skip to content

Conversation

@Gepacam
Copy link
Collaborator

@Gepacam Gepacam commented Nov 4, 2025

Description

-[ ] Implements deterministic CRUD test coverage for GTFS Schedule models (AgencySchedule, CalendarSchedule, and ShapeSchedule), using an isolated in-memory SQLite database to ensure full independence from PostGIS extensions during CI or local test runs.

  • Composite Primary Keys (CPKs) were intentionally not implemented, following academic guidance from course instructor on October 14 during a Zoom meeting, to maintain compatibility with Django ORM and the Django admin interface.

Changes

  • Added tests/test_schedule_crud.py with CRUD coverage for schedule models.
  • Added schedule_tests.py as a lightweight standalone test runner.
  • Updated settings.py to conditionally disable GeoDjango during test execution.
  • Updated CHANGELOG.md documenting added coverage and test isolation.
  • Ensured referential integrity across AgencySchedule, CalendarSchedule, and ShapeSchedule.

Subissue

Checklist

  • CRUD tests pass locally and under CI (pytest & manage.py test)
  • SQLite fallback for test isolation verified
  • Composite PKs intentionally deferred per academic decision
  • CHANGELOG updated
  • All tests passing

Implements core GTFS Schedule entities (agency, routes, trips, stops, stop_times, shapes, calendar, calendar_dates, feed_info)
with ForeignKeys and UniqueConstraints as specified in GTFS v2.0.

Migrations were created and applied successfully under PostGIS backend.

Closes #3.
…CPKs per academic guidance

Implements deterministic CRUD test coverage for the GTFS Schedule module, ensuring referential integrity across
AgencySchedule, CalendarSchedule, and ShapeSchedule.
Composite Primary Keys (CPKs) were intentionally not implemented, per academic guidance from course instructor,
to maintain compatibility with Django ORM and simplify admin integration.
@Gepacam Gepacam requested a review from fabianabarca November 4, 2025 05:29
@Gepacam Gepacam self-assigned this Nov 4, 2025
Gepacam added a commit that referenced this pull request Nov 5, 2025
…gration #5

Adds management command `create_schedule_fixtures` to generate a minimal, deterministic GTFS Schedule dataset.
Includes --seed and --output options, produces a tiny, loaddata-friendly JSON, and is exercised by a pytest test.

- Shapes PKs are numeric to align with Django's AutoField/BigAutoField.
- Tests run without PostGIS by using the non-GIS test settings.
- Validated end-to-end via `pytest -v tests/test_fixtures.py`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants